package com.appspot.didit.client.workitem;

import java.util.ArrayList;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Label;

public class WorkitemList {
	
	public static FlexTable table = new FlexTable();
	
	public WorkitemList() {
	}
	
	public static FlexTable getTable() {
		table.clear();
		table.setWidget(0, 0, new Label("Description"));
		table.setWidget(0, 1, new Label("Duraton"));
		table.setWidget(0, 2, new Label("Tags"));
		ArrayList<Workitem> wl = WorkitemManager.getInstance().getWorkitemList();
		for(int i = 0; i < wl.size(); i++) {
			Workitem wi = wl.get(i);
/*			table.setWidget(i+1, 0, new EnhancedTextBox(wi.getDescription()));
			table.setWidget(i+1, 1, new EnhancedTextBox(wi.getDuration() + ""));
			table.setWidget(i+1, 2, new EnhancedTextBox(wi.getTagString()));
*/		}
		return table;
	}
}
 